package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.List;

@TableName("t_inorder")
public class InOrderBean {
    @TableId(value = "pk_ioId",type = IdType.AUTO)
    private Integer id;
    @TableField("io_name")
    private String name;
    @TableField("io_person")
    private String person;
    @TableField("io_date")
    private LocalDate date=LocalDate.now();

//    @TableField("io_userName")
//    private String userName;
    @TableField(exist = false)
    private List<InDetailBean> detailBeans;

    public InOrderBean() {

    }

    public InOrderBean(String name, String person) {
        this.name = name;
        this.person = person;
//        this.userName = userName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPerson() {
        return person;
    }

    public void setPerson(String person) {
        this.person = person;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

//    public String getUserName() {
//        return userName;
//    }
//
//    public void setUserName(String userName) {
//        this.userName = userName;
//    }

    public List<InDetailBean> getDetailBeans() {
        return detailBeans;
    }

    public void setDetailBeans(List<InDetailBean> detailBeans) {
        this.detailBeans = detailBeans;
    }

    @Override
    public String toString() {
        return "InOrderBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", person='" + person + '\'' +
                ", date=" + date +
                ", detailBeans=" + detailBeans +
                '}';
    }
}
